// help.js - Help text for init command

export function showInitHelp() {
  console.log('Initialize Claude Code integration files with Claude Flow v2.0.0');
  console.log();
  console.log('Usage: claude-flow init [options]');
  console.log();
  console.log('🚀 DEFAULT BEHAVIOR:');
  console.log('  claude-flow init     Initialize with Claude Flow v2.0.0 enhanced features');
  console.log('                       Creates CLAUDE.md & .claude/commands for MCP integration');
  console.log();
  console.log('Standard Options:');
  console.log('  --force, -f          Overwrite existing files (also updates .gitignore)');
  console.log('  --dry-run, -d        Preview what would be created without making changes');
  console.log('  --help, -h           Show this help message');
  console.log();
  console.log('Environment Configuration:');
  console.log('  --env                Generate .env template for API keys');
  console.log('                       • Required for ReasoningBank memory');
  console.log('                       • Includes setup instructions');
  console.log('                       • Cost optimization guide');
  console.log();
  console.log('Specialized Agent Setup:');
  console.log('  --agent reasoning    Setup ReasoningBank agents with closed-loop learning');
  console.log('                       Includes goal-planner and sublinear-goal-planner agents');
  console.log('                       • +26% success rate (70% → 88%)');
  console.log('                       • -25% token usage (cost savings)');
  console.log('                       • 3.2x learning velocity (faster improvement)');
  console.log();
  console.log('Alternative Initialization Modes:');
  console.log('  --basic              Use basic initialization (pre-v2.0.0 behavior)');
  console.log('  --sparc, -s          Initialize with SPARC development environment');
  console.log('  --minimal, -m        Create minimal configuration files');
  console.log('  --modes <list>       Initialize only specific SPARC modes (comma-separated)');
  console.log('  --skip-mcp           Skip automatic MCP server setup in Claude Code');
  console.log('  --monitoring         Enable token usage tracking and telemetry setup');
  console.log();
  console.log('Verification & Pair Programming:');
  console.log('  --verify             Initialize with Truth Verification System enabled');
  console.log('  --pair               Initialize with Pair Programming mode enabled');
  console.log('                       (These options create verification-focused CLAUDE.md)');
  console.log();
  console.log('Advanced Options:');
  console.log('  --enhanced, --safe   Enhanced initialization with validation and rollback');
  console.log('  --validate           Run validation checks only');
  console.log('  --validate-only      Validate without initializing');
  console.log('  --rollback           Rollback previous initialization');
  console.log('  --list-backups       List available backups and rollback points');
  console.log();
  console.log('Validation & Rollback Options:');
  console.log('  --skip-pre-validation    Skip pre-initialization checks');
  console.log('  --skip-backup           Skip backup creation');
  console.log('  --rollback --full       Perform full system rollback');
  console.log('  --rollback --partial --phase <name>  Rollback specific phase');
  console.log('  --validate --skip-pre-init           Skip pre-init validation');
  console.log('  --validate --skip-config            Skip configuration validation');
  console.log('  --validate --skip-mode-test         Skip SPARC mode testing');
  console.log();
  console.log('Examples:');
  console.log('📋 ENVIRONMENT SETUP:');
  console.log('  claude-flow init --env                      # Generate .env template');
  console.log('  claude-flow init --env --force              # Overwrite existing .env');
  console.log();
  console.log('🌊 CLAUDE FLOW v2.0.0 (DEFAULT):');
  console.log('  claude-flow init                    # ⭐ DEFAULT: Full Claude Flow v2.0.0 setup');
  console.log('  claude-flow init --force            # Overwrite existing configuration');
  console.log('  claude-flow init --dry-run          # Preview what will be created');
  console.log('  claude-flow init --monitoring       # Initialize with token tracking enabled');
  console.log();
  console.log('🚀 STANDARD INITIALIZATION:');
  console.log('  npx claude-flow@latest init --sparc --force  # ⭐ RECOMMENDED: Optimized setup');
  console.log('  npx claude-flow@latest init --sparc          # Standard SPARC setup');
  console.log(
    '  claude-flow init --sparc --force             # Optimized setup (existing project)',
  );
  console.log('  claude-flow init --sparc --modes architect,tdd,code  # Selective initialization');
  console.log('  claude-flow init --dry-run --sparc          # Preview initialization');
  console.log('  claude-flow init --minimal                  # Minimal setup');
  console.log();
  console.log('🧠 REASONING AGENTS WITH REASONINGBANK:');
  console.log('  claude-flow init --agent reasoning          # Setup ReasoningBank agents');
  console.log('  claude-flow init --agent reasoning --force  # Overwrite existing setup');
  console.log('  # Note: Requires .env with API keys for actual learning');
  console.log('  # Use: npx agentic-flow --agent goal-planner --task "your task"');
  console.log();
  console.log('🔍 VERIFICATION & PAIR PROGRAMMING:');
  console.log('  claude-flow init --verify                   # Truth Verification System setup');
  console.log('  claude-flow init --pair                     # Pair Programming mode setup');
  console.log('  claude-flow init --verify --pair            # Both verification and pairing');
  console.log('  npx claude-flow@alpha init --verify --pair  # Complete verification setup');
  console.log();
  console.log('🔄 VALIDATION & ROLLBACK:');
  console.log('  claude-flow init --validate                 # Validate existing setup');
  console.log('  claude-flow init --rollback --full          # Full system rollback');
  console.log('  claude-flow init --rollback --partial --phase sparc-init  # Rollback SPARC only');
  console.log('  claude-flow init --list-backups             # Show available backups');
  console.log();
  console.log('What gets created:');
  console.log('  • .claude/settings.json - Claude Code configuration with hooks');
  console.log('  • .claude/settings.local.json - Pre-approved MCP permissions (no prompts!)');
  console.log('  • .mcp.json - Project-scoped MCP server configuration');
  console.log('  • claude-flow.config.json - Claude Flow features and performance settings');
  console.log('  • .claude/commands/ directory with 20+ Claude Code slash commands');
  console.log('  • CLAUDE.md with project instructions (v2.0.0 enhanced by default)');
  console.log('  • memory/ directory for persistent context storage');
  console.log('  • coordination/ directory for agent orchestration');
  console.log('  • ./claude-flow local executable wrapper');
  console.log('  • .gitignore entries for Claude Flow generated files');
  console.log('  • Automatic MCP server setup if Claude Code CLI is installed');
  console.log('  • Pre-configured for TDD, architecture, and code generation');
  console.log();
  console.log('Claude Code Slash Commands Created:');
  console.log('  • /sparc - Execute SPARC methodology workflows');
  console.log('  • /sparc-<mode> - Run specific SPARC modes (17+ modes)');
  console.log('  • /claude-flow-help - Show all claude-flow commands');
  console.log('  • /claude-flow-memory - Interact with memory system');
  console.log('  • /claude-flow-swarm - Coordinate multi-agent swarms');
  console.log();
  console.log('Available SPARC modes:');
  console.log('  • architect - System design and architecture');
  console.log('  • code - Clean, modular implementation');
  console.log('  • tdd - Test-driven development');
  console.log('  • debug - Advanced debugging and optimization');
  console.log('  • security-review - Security analysis and hardening');
  console.log('  • docs-writer - Documentation creation');
  console.log('  • integration - System integration');
  console.log('  • swarm - Multi-agent coordination');
  console.log('  • spec-pseudocode - Requirements and specifications');
  console.log('  • devops - Deployment and infrastructure');
  console.log('  • And 7+ more specialized modes...');
  console.log();
  console.log('Learn more: https://github.com/ruvnet/claude-code-flow');
}
